package Odinote::Callbacks;

use strict;
use warnings;

use Glib qw/TRUE FALSE/;
use Gtk2;

sub about_open
{
  Odinote::About->open;
}

sub about_close
{
  Odinote::About->close;
}

sub file_menu_new_doc
{
  Odinote::Document->new->open;
}

sub open_file_dialog_start
{
  Odinote::OpenFile->open;
}

sub open_file_dialog_cancel
{
  Odinote::OpenFile->cancel;
}

sub open_file_dialog_choose
{
  Odinote::OpenFile->choose;
}

sub window_delete_event
{
  print "Destroy event occurred.\n";
  return FALSE;
}

sub close_current_document
{
  Odinote::DocTabs->close_current;
}

sub edit_copy
{
  Odinote::DocTabs->copy_selected;
}

sub edit_cut
{
  Odinote::DocTabs->cut_selected;
}

sub edit_paste
{
  Odinote::DocTabs->paste_selected;
}

sub quit
{
  print "Quitting.\n";
  Gtk2->main_quit;
}

1;
